<%@ page import="java.sql.*" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> Vigneti </title>
</head>
<body>
	<table>
	<%
	Class.forName("oracle.jdbc.driver.OracleDriver");
	Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "aziendavinicola","filippo");
	session.setAttribute("connection", con);
	Statement st = con.createStatement();
	ResultSet rs = st.executeQuery("Select codicevigneto from vigneto");
	while (rs.next())
	{
		%> <tr> <%
		out.println(rs.getString(1));	
		%> </tr>
		<%
	}
	%>
	<tr> 
	<h4> ---------- </h4>
	</tr>
	</table>

	<form action="InfoVigneto.jsp" name="form" method="post">
	<table>
	<tr >Inserisci il nome del vino per le info :
		<input type="text" name="vigneto" size="25"> 
	</tr>
	</table>
	</form>

</body>
</html>